<%--
  Created by IntelliJ IDEA.
  User: meng
  Date: 2020/6/18
  Time: 19:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% String path = request.getContextPath();%>


<jsp:include page="../inc/header.jsp"></jsp:include>

<!-- Page Heading Section Start -->
<div class="page-heading-section section bg-parallax" data-bg-image="assets/images/bg/bg-1.jpg" data-overlay="50">
    <div class="container">
        <div class="page-heading-content text-center">
            <h3 class="title">博客</h3>
            <ol class="breadcrumb">
               <%-- <li class="breadcrumb-item"><a href="index.html">首页</a></li>--%>
                <%--<li class="breadcrumb-item active">博客</li>--%>
            </ol>
        </div>
    </div>
</div>
<!-- Page Heading Section End -->

<!-- Blog Section Start -->
<div class="section section-padding">
    <div class="container">

        <!-- Blog Wrapper Start -->
        <div class="blog-wrap row">

            <c:forEach items="${requestScope.all.list}" var="person" varStatus="x">
            <!-- Blog Start -->
            <div class="col-lg-4 col-md-6 col-12">
                <div class="blog">
                    <div class="media">
                        <c:if test="${person.pic==0}">
                        <a href="#"><img src="<%=path%>/static/images/web/uploadimages/0.jpeg" style="width: 25px" alt=""></a>
                        </c:if>
                        <c:if test="${person.pic!=0}">
                            <a href="#"><img src="<%=path%>/static/images/web/uploadimages/${person.pic}" alt=""></a>
                        </c:if>
                    </div>
                    <div class="content">
                        <h6 class="title"><a href="#">博客${x.count}</a></h6>
                        <ul class="meta">
                            <li>
                            </li>
                            <li><a href="#">标题${x.count}</a></li>
                        </ul>
                        <div class="desc">
                            <p>正文${x.count}</p>
                        </div>
                        <a href="blog-single.html" class="read-more">更多 <i class="fa fa-angle-right"></i></a>
                    </div>
                </div>
            </div>
            <!-- Blog End -->
            </c:forEach>



        </div>
        <!-- Blog Wrapper End -->

        <!-- Pagination Start -->
        <ul class="pagination pagination-center mt-5">
            <li class="page-item"><a class="page-link" href="#"><i class="fa fa-angle-left"></i></a></li>
            <%--<li class="page-item active"><a class="page-link" href="#">1</a></li>
            <li class="page-item"><a class="page-link" href="#">2</a></li>
            <li class="page-item"><a class="page-link" href="#">3</a></li>
            <li class="page-item"><a class="page-link" href="#">4</a></li>--%>
            <c:forEach begin="1" end="${requestScope.all.pages}" step="1" var="i">

                <c:if test="${i==requestScope.all.pageNum}">
                    <li class="page-item"><a class="page-link" href="#">
                        <b>${requestScope.all.pageNum}</b>
                    </a></li>
                </c:if>
                <c:if test="${i!=requestScope.all.pageNum}">
                    <li class="page-item"><a class="page-link" href="#">
                            ${i}
                    </a></li>
                </c:if>

            </c:forEach>

            <li class="page-item"><a class="page-link" href="#"><i class="fa fa-angle-right"></i></a></li>
        </ul>
        <!-- Pagination End -->

    </div>
</div>
<!-- Blog Section End -->
<jsp:include page="../inc/footer.jsp"></jsp:include>